#pragma once

#include <iostream>

#include "mcu_api.h"

namespace mcu {

using std::string;



class Client {
public:
  Client(string url);

  error CreateEventQueue();
  error DeleteEventQueue();
  error CreateConference(string& tags, int vad, int rate);
  error DeleteConference();
  error CreateMosaic(int comp, int size);
  error DeleteMosaic();
  error CreateSidebar();
  error DeleteSidebar();
  /**
   *
   * @params type  : 0表示RTP，1表示RTMP
  */
  error CreateParticipant(string& sname, string& token, int type);
  error DeleteParticipant();

  error StartPublishing(string& rtmpServer, int port, string& app, string& stream);
  error StopPublishing();

  error StartReceiving(int media, RtpMap& rtpMap, RtpMap& aptMap);
  error StopReceiving(int media);

  int GetPort() const { return _port;}
  int GetConferenceID() const { return _confID;}
private:
  int _queueID = 0;
  int _confID = 0;
  int _mosaicID = 0;
  int _sidebarID = 0;
  int _partID = 0;
  int _publisherID = 0;
  int _port = 0;
  string _url;

};

}
